//
//  CollectionViewBaseCell.swift
//  DouYuZB
//
//  Created by DSDL on 2016/11/1.
//  Copyright © 2016年 鼎商动力. All rights reserved.
//

import UIKit

class CollectionViewBaseCell: UICollectionViewCell {
    //MARK: - 定义控件属性
    @IBOutlet weak var iconImageView: UIImageView!
    @IBOutlet weak var nickNameLabel: UILabel!
    @IBOutlet weak var onlineBtn: UIButton!
    
    //MARK: - 定义模型属性
    var anchor: AnchorModel?{
        didSet{
            //0.校验模型
            guard let anchor = anchor else {return}
            //1.返回在线人数
            onlineBtn.setTitle(anchor.onlineStr, for: UIControlState())
            //2.主播昵称
            nickNameLabel.text = anchor.nickname
            //4.封面图片
             iconImageView.kf.setImage(with: (URL(string: anchor.vertical_src )))
        }
    }
}
